package main

import (
	"perfect-admin/dao"
	"perfect-admin/global"
	"perfect-admin/initialize"
)

func main()  {
	// 初始化日志
	initialize.InitGlobalLog()
	// 初始化数据库
	switch global.CONFIG.System.DBType {
	case "mysql":
		dao.InitMysql()
	default:
		dao.InitMysql()
	}
	defer dao.Close()
	// 数据表迁移
	initialize.DBTableMigrate()
	// 数据表迁移
	routers := initialize.SetupRouters()
	_ = routers.Run(":8000")
}


